home *** CD-ROM | disk | FTP | other *** search
/ Quick PC 62 / Quick PC 62.iso / I386 / IIS5_01.CAB / IIS_PopulateForm_JScript.asp < prev    next >
Encoding:
Text File  |  1998-05-29  |  1.4 KB  |  53 lines

  1. <%@ LANGUAGE = JScript %>
  2.  
  3. <!*************************
  4. This sample is provided for educational purposes only. It is not intended to be 
  5. used in a production environment, has not been tested in a production environment, 
  6. and Microsoft will not provide technical support for it. 
  7. *************************>
  8.  
  9. <% 
  10.     //Create and set variables that will be used in populating
  11.     //the form.  In a typical application, these values would come
  12.     //from a database or text file.
  13.  
  14.     var strFirstName;
  15.     var strLastName;
  16.     var strAddress1;
  17.     var strAddress2;
  18.     var blnInfo;
  19.  
  20.     strFirstName = "John";
  21.     strLastName = "Doe";
  22.     strAddress1 = "1 Main Street";
  23.     strAddress2 = "Nowhere ZA, 12345";
  24. %>
  25.  
  26. <HTML>
  27.     <HEAD>
  28.         <TITLE>PopulateForm Sample</TITLE>
  29.     </HEAD>
  30.  
  31.     <BODY BGCOLOR="White" TOPMARGIN="10" LEFTMARGIN="10">
  32.  
  33.  
  34.         <!-- Display header. -->
  35.  
  36.         <FONT SIZE="4" FACE="ARIAL, HELVETICA">
  37.         <B>PopulateForm Sample</B></FONT><BR>
  38.       
  39.         <HR SIZE="1" COLOR="#000000">
  40.  
  41.  
  42.         <FORM ACTION="">
  43.         
  44.         <!-- Use ASP variables to fill out the form. -->
  45.  
  46.         <P>First Name: <INPUT TYPE="TEXT" NAME="FNAME" VALUE="<%= strFirstName %>"></P>
  47.         <P>Last Name: <INPUT TYPE="TEXT" NAME="LNAME" VALUE="<%= strLastName %>"></P>
  48.         <P>Street: <INPUT TYPE="TEXT" NAME="STREET" VALUE="<%= strAddress1 %>"></P>
  49.         <P>City State, Zip: <INPUT TYPE="TEXT" NAME="FNAME" VALUE="<%= strAddress2 %>"></P>    
  50.  
  51.     </BODY>
  52. </HTML>
  53.